package com.zhentao.tot.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zhentao.tot.mapper.ApArticleContentMapper;
import com.zhentao.tot.domain.ApArticleContent;
import com.zhentao.tot.service.IApArticleContentService;

/**
 * App已发布文章内容Service业务层处理
 *
 * @author ruoyi
 * @date 2025-04-23
 */
@Service
public class ApArticleContentServiceImpl implements IApArticleContentService
{
    @Autowired
    private ApArticleContentMapper apArticleContentMapper;

    /**
     * 查询App已发布文章内容
     *
     * @param id App已发布文章内容主键
     * @return App已发布文章内容
     */
    @Override
    public ApArticleContent selectApArticleContentById(Integer id)
    {
        return apArticleContentMapper.selectApArticleContentById(id);
    }

    @Override
    public ApArticleContent selectApArticleContentArticleId(Integer articleId) {
        ApArticleContent apArticleContent = apArticleContentMapper.selectApArticleContentArticleId(articleId);
        return apArticleContent;
    }

    /**
     * 查询App已发布文章内容列表
     *
     * @param apArticleContent App已发布文章内容
     * @return App已发布文章内容
     */
    @Override
    public List<ApArticleContent> selectApArticleContentList(ApArticleContent apArticleContent)
    {
        return apArticleContentMapper.selectApArticleContentList(apArticleContent);
    }

    /**
     * 新增App已发布文章内容
     *
     * @param apArticleContent App已发布文章内容
     * @return 结果
     */
    @Override
    public int insertApArticleContent(ApArticleContent apArticleContent) {
        return apArticleContentMapper.insertApArticleContent(apArticleContent);
    }

    @Override
    public List<ApArticleContent> selectApArticleContentLists() {
        return apArticleContentMapper.selectApArticleContentLists();
    }

    /**
     * 修改App已发布文章内容
     *
     * @param apArticleContent App已发布文章内容
     * @return 结果
     */
    @Override
    public int updateApArticleContent(ApArticleContent apArticleContent) {
        return apArticleContentMapper.updateApArticleContent(apArticleContent);
    }

    @Override
    public int updateApArticleContentArticleId(ApArticleContent apArticleContent) {
        int i = apArticleContentMapper.updateApArticleContentArticleId(apArticleContent);
        return i;
    }

    /**
     * 批量删除App已发布文章内容
     *
     * @param ids 需要删除的App已发布文章内容主键
     * @return 结果
     */
    @Override
    public int deleteApArticleContentByIds(Integer[] ids)
    {
        return apArticleContentMapper.deleteApArticleContentByIds(ids);
    }

    @Override
    public int deleteApArticleContentByArticleIds(Integer[] ids) {
     int i=  apArticleContentMapper.deleteApArticleContentByArticleIds(ids);
        return i;
    }

    /**
     * 删除App已发布文章内容信息
     *
     * @param id App已发布文章内容主键
     * @return 结果
     */
    @Override
    public int deleteApArticleContentById(Integer id)
    {
        return apArticleContentMapper.deleteApArticleContentById(id);
    }

    @Override
    public int deleteApArticleContentByArticleId(Integer id) {
     int i=   apArticleContentMapper.deleteApArticleContentByArticleId(id);
        return 0;
    }
}
